package biz

import (
	"github.com/go-kratos/kratos/v2/log"
	"github.com/google/wire"
	"stwin.net/demo/internal/conf"
	"stwin.net/demo/internal/data"
	"stwin.net/zoro/zconfig"
)

// 文件整体无需改动

type Usecase struct {
	repo *data.Repo
	log  *log.Helper
	conf *conf.Custom
}

// biz providers. *HttpUsecase & *GrpcUsecase
var ProviderSet = wire.NewSet(NewUsecase)

func NewUsecase(bs zconfig.IZoroConfig, r *data.Repo, lg log.Logger) *Usecase {
	return &Usecase{
		repo: r,
		log:  log.NewHelper(lg),
		conf: bs.HotKey().(*conf.Custom),
	}
}
